Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version action support to Param class #662

Merged
merged 2 commits into from
Dec 30, 2024
Merged

Add version action support to Param class #662

merged 2 commits into from
Dec 30, 2024

Conversation

ncoop57
Copy link

@ncoop57 ncoop57 commented Dec 30, 2024

This PR adds support for the 'version' action in the Param class, allowing scripts to easily implement version flags. Key changes include:

  • Added version parameter to Param.init
  • Modified set_default to handle version action
  • Updated documentation and added examples

The new version action works similarly to argparse's version action, making it easier to add version information to CLI tools built with fastcore.script.

@ncoop57 ncoop57 requested a review from jph00 December 30, 2024 18:35
@jph00 jph00 merged commit 9a80a39 into main Dec 30, 2024
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants